﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using FileMonitor.Service.Prototype;

namespace FileMonitor.Service.ProcessMonitor.Model
{
    

    [DataContract]
    public class MonitorProcessInfo
    {
        private string _processName;

        [DataMember]
        public string ProcessName
        {
            get { return _processName; }
            set { this._processName = value; }
        }

        private string _processDescription;
        [DataMember]
        public string ProcessDescription
        {
            get { return _processDescription; }
            set { this._processDescription = value; }
        }

        private ProcessState _state = ProcessState.Waitting;

        [DataMember]
        public ProcessState State
        {
            get { return this._state; }
            set { this._state = value; }
        }
        
        private string _monitorPath;
        [DataMember]
        public string MonitorPath
        {
            get { return this._monitorPath; }
            set { this._monitorPath = value; }
        }

        
 
        private List<FileInfo> _processedFileInfos;


        [DataMember]
        public List<FileInfo> ProcessedFileInfos
        {
            get { return this._processedFileInfos; }
            set { this._processedFileInfos = value; }
        }


        public MonitorProcessInfo(FileMonitorBase process)
        {
            this._processName = process.Name;
            this._processDescription =process.Description;
            this._monitorPath = process.MonitorPath;
            this._state = process.ProcessState;
            this._processedFileInfos = new List<FileInfo>();
        }
        
    }
}
